<?php

class About extends Controller {

	function About()
	{
		parent::Controller();	
        $this->load->model('aboutmodel'); 
	}
    
    function index($id=FALSE)
    {	
                                                                   
        //news summary
        $this->load->model('newsmodel'); 
        $data["news_list"] = $this->newsmodel->get_news_summary(3);

        //glossary of the day
        $this->load->model('glossarymodel'); 
        $data["glossary_item"] = $this->glossarymodel->get_glossary_of_the_day();

        //about headlines
        $data["headlines"] = $this->aboutmodel->get_about_headlines();

        //register content 
		$this->load->model('pageheadersmodel'); 
        $data["register"] = $this->pageheadersmodel->get_header('insider');

    	 if (INSTANCE_IS_DEFERRANTI === TRUE) {
			// get all content for de ferranti
		    $data["content"] = $this->aboutmodel->get_all_content();
			if (empty($data["content"])) show_404();
		 } else {
			// get selected content for paris ceramics
			$data["content"] = $this->aboutmodel->get_content($id);
			if (empty($data["content"])) show_404();
		 }

        $this->load->view('website/default/head', array("document_title" => DOCUMENT_TITLE . "About")); 
        $this->load->view('website/default/header');  
        $this->load->view('website/about/about'.INSTANCE_FILE_SUFFIX, $data);   
        $this->load->view('website/default/footer');   

    }

    function privacy_policy()
    {	
        $this->load->model('pageheadersmodel');
        $data = $this->pageheadersmodel->admin_get_item(PRIVACY_POLICY_ID); 
        if(empty($data)) show_404();

		 $this->load->view('website/about/privacy_policy_overlay', $data);
	}
	
}

/* End of file welcome.php */
/* Location: ./system/application/controllers/welcome.php */